import service from '@/utils/request'

// 切换收藏状态
export function toggleFavoriteService(questionId) {
  return service({
    url: '/user/question/favorite/toggle',
    method: 'post',
    data: { questionId }
  })
}

// 检查是否已收藏
export function checkFavoriteService(questionId) {
  return service({
    url: '/user/question/favorite/check',
    method: 'get',
    params: { questionId }
  })
}

// 获取用户收藏列表
export function getFavoriteListService(params) {
  return service({
    url: '/user/question/favorite/list',
    method: 'get',
    params
  })
}
